<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>表格标签</title>
</head>
<body>
  <!-- table定义一个表格 -->
  <table border="1">
    <tr>
      <td>第一行第一列</td>
      <td>第一行第二列</td>
      <td>第一行第三列</td>
    </tr>
    <tr>
      <td>第二行第一列</td>
      <td>第二行第二列</td>
    </tr>
  </table>
  <br>
  <!-- 合并单元格 -->
  <table border="1">
    <tr>
      <td colspan="2" align="center">1-1</td>
      <td rowspan="2">1-3</td>
      <td rowspan="3">1-4</td>
    </tr>
    <tr>
      <td>2-1</td>
      <td>2-2</td>
    </tr>
    <tr>
      <td colspan="3" align="center">3-1</td>
    </tr>
  </table>
  <br>
  <table border="1">
    <caption>购物车</caption>
    <tr><!-- th表头中的列 有加粗并居中效果 -->
      <th>编号</th>
      <th>名称</th>
      <th>价格</th>
    </tr>
    <tr>
      <td>1</td>
      <td>联想笔记本电脑</td>
      <td>5000￥</td>
    </tr>
    <tr>
      <td>2</td>
      <td>小米手机</td>
      <td>3000￥</td>
    </tr>
    <tr>
      <td colspan="3">总价:8000￥</td>
    </tr>
  </table>
  <br>
  <table border="1" width="300">
    <tr>
      <td>1-1</td>
      <td>1-2</td>
      <td>1-3</td>
    </tr>
    <tr>
      <td colspan="3">
        <table border="1" width="300">
          <tr>
            <td>2-1</td>
            <td>2-2</td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
</body>
</html>